<div id="maincontent">
<?php
static $carinfo_extend_options =array(
		'comm_config'=>array(
			'title' =>'配置选项','type'=>'key',
			'option'=>array('Y'=>'标准配置',	'S'=>'选装配置',	'N'=>'无'),
		),
		'engine_work_type'=>array(
			'title' =>'工作方式','type'=>'value',
			'option'=>array('自然吸气',	'增压进气'),
		),
		'engine_cylinder_type'=>array(
			'title' =>'气缸排列类型','type'=>'key',
			'option'=>array('L'=>'直列发动机',	'V'=>'V型排列',	'W'=>'W型排列',
							'H'=>'水平对置发动机',	'R'=>'转子发动机')
		),

		'engine_fuel_type'=>array( 
			'title' =>'燃料形式','type'=>'value',
			'option'=>array('汽油',	'柴油',	'油电混合',	'电动'),
		),
		'engine_fuel_supply'=>array(
			'title' =>'供油方式','type'=>'value',
			'option'=>array('化油器',	'单点电喷',	'多点电喷',	'直喷'),
		),
		'engine_cylinder_cover'=>array(
			'title' =>'缸盖材料','type'=>'value',
			'option'=>array('铝合金',	'灰铸铁',	'合金铸铁')
		),
		'engine_cylinder_body'=>array(
			'title' =>'缸盖材料','type'=>'value',
			'option'=>array('铝合金',	'铸铁',	'合金铸铁')
		),
		'engine_environment_protection'=>array(
			'title' =>'环保标准','type'=>'value',
			'option'=>array('欧I',	'欧II',	'欧III',	'欧IV',	'欧V',	'欧VI')
		),
		'transmission_type'=>array(
			'title' =>'变速箱类型','type'=>'value',
			'option'=>array('手动',	'普通自动',	'CVT无极变速',	'双离合变速',	'序列变速')
		),
		'chassis_driven_type'=>array(
			'title' =>'驱动方式','type'=>'value',
			'option'=>array('前置前驱(FF)',	'前置后驱(FR)',	'前置四驱',	'中置后驱(MR)',	'中置四驱',	'后置后驱(RR)',	'后置四驱')
		),
		'chassis_help_power'=>array(
			'title' =>'助力类型','type'=>'value',
			'option'=>array('电动助力',	'电子液压助力',	'机械液压助力')
		),
		'chassis_structure'=>array(
			'title' =>'底盘结构','type'=>'value',
			'option'=>array('非承载式',	'承载式')
		),
		'brake_front_type'=>array(
			'title' =>'前制动器类型','type'=>'value',
			'option'=>array('盘式',	'鼓式',	'通风盘式',	'陶瓷通风盘式')
		),
		'brake_rear_type'=>array(
			'title' =>'后制动器类型','type'=>'value',
			'option'=>array('盘式',	'鼓式',	'通风盘式',	'陶瓷通风盘式')
		),
		'brake_park_type'=>array(
			'title' =>'驻车制动类型','type'=>'value',
			'option'=>array('手刹',	'脚刹',	'电子驻车')
		),
	);
static $carinfo_extend_fields =array(
		'body'=> array(  
			'title' =>'车身',
			'field'=>array(
				array('name'=>'body_length',	'length'=>10,	'title'=>'长'	,'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_width',	'length'=>10,	'title'=>'宽'	,'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_height',	'length'=>10,	'title'=>'高'	,'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_wheelbase',	'length'=>10,	'title'=>'轴距',	'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_front_track',	'length'=>10,	'title'=>'前轮距',	'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_rear_track',	'length'=>10,	'title'=>'后轮距',	'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_min_ground',	'length'=>10,	'title'=>'最小地间距',	'unit'=>'mm',	'input'=>'number'),
				array('name'=>'body_weight',	'length'=>10,	'title'=>'整车质量',	'unit'=>'kg',	'input'=>'number'),
				array('name'=>'body_doors',	'length'=>10,	'title'=>'车门数',	'unit'=>'个',	'input'=>'number'),
				array('name'=>'body_seats',	'length'=>10,	'title'=>'座位数',	'unit'=>'个',	'input'=>'number'),
				array('name'=>'body_tank_capacity',	'length'=>10,	'title'=>'邮箱容量',	'unit'=>'L',	'input'=>'number'),
				array('name'=>'body_trunk_capacity',	'length'=>10,	'title'=>'行李箱容量',	'unit'=>'L',	'input'=>'number'),
				),
			),
		'engine'=> array(  
			'title' =>'发动机',
			'field'=>array(
				array('name'=>'engine_cylinder_capacity',	'length'=>10,	'title'=>'发动机气缸容积',	'unit'=>'cc',	'input'=>'number'),
				array('name'=>'engine_displacement',	'length'=>10,	'title'=>'排量',	'unit'=>'L',	'input'=>'number'),
				array('name'=>'engine_work_type',	'length'=>10,	'title'=>'工作方式',	'input'=>'select'),
				array('name'=>'engine_cylinder_type',	'length'=>10,	'title'=>'气缸排列类型',	'input'=>'select',	'option'=>'engine_cylinder_type'),
				array('name'=>'engine_cylinder_count',	'length'=>10,	'title'=>'气缸数' ,'unit'=>'个',	'input'=>'number'),
				array('name'=>'engine_cylinder_valves',	'length'=>10,	'title'=>'每缸气门数' ,'unit'=>'个',	'input'=>'number'),
				array('name'=>'engine_compression_ratio',	'length'=>10,	'title'=>'压缩比'),
				array('name'=>'engine_valve_type',	'length'=>10,	'title'=>'气门结构'),
				array('name'=>'engine_bore',	'length'=>10,	'title'=>'缸径 mm',	'input'=>'number'),
				array('name'=>'engine_stroke',	'length'=>10,	'title'=>'冲程 mm',	'input'=>'number'),
				array('name'=>'engine_max_horsepower',	'length'=>10,	'title'=>'最大马力',	'unit'=>'ps',	'input'=>'number'),
				array('name'=>'engine_max_power',	'length'=>10,	'title'=>'最大功率',	'unit'=>'kw',	'input'=>'number'),
				array('name'=>'engine_max_power_speed',	'length'=>10,	'title'=>'最大转速',	'unit'=>'rpm',	'input'=>'number'),
				array('name'=>'engine_max_torque',	'length'=>10,	'title'=>'最大扭矩',	'unit'=>'N•m',	'input'=>'number'),
				array('name'=>'engine_max_torque_speed',	'length'=>10,	'title'=>'最大扭矩',	'unit'=>'rpm',	'input'=>'number'),
				array('name'=>'engine_technology',	'length'=>200,	'title'=>'发动机特有技术'),
				array('name'=>'engine_fuel_type',	'length'=>10,	'title'=>'燃料形式',	'input'=>'select'),
				array('name'=>'engine_fuel_grade',	'length'=>10,	'title'=>'燃油标号'),
				array('name'=>'engine_fuel_supply',	'length'=>10,	'title'=>'供油方式',	'input'=>'select'),
				array('name'=>'engine_cylinder_cover',	'length'=>10,	'title'=>'缸盖材料',	'input'=>'select'),
				array('name'=>'engine_cylinder_body',	'length'=>10,	'title'=>'缸体材料',	'input'=>'select'),
				array('name'=>'engine_environment_protection',	'length'=>10,	'title'=>'环保标准',	'input'=>'select',	'option'=>'engine_environment_protection'),
				array('name'=>'engine_model',	'length'=>50,	'title'=>'发动机型号'),
				)
			),
		'transmission'=> array(  
			'title' =>'变速箱',
			'field'=>array(
				array('name'=>'transmission_simple',	'length'=>50,	'title'=>'变速箱简称'),
				array('name'=>'transmission_stalls',	'length'=>10,	'title'=>'档位个数'),
				array('name'=>'transmission_type',	'length'=>50,	'title'=>'变速箱类型',	'input'=>'select'),
				)
			),
		'chassis'=> array( 
			'title' =>'底盘转向',
			'field'=>array(
				array('name'=>'chassis_driven_type',	'length'=>50,	'title'=>'驱动方式',	'input'=>'select'),
				array('name'=>'chassis_front_suspension',	'length'=>50,	'title'=>'前悬挂类型'),
				array('name'=>'chassis_rear_suspension',	'length'=>50,	'title'=>'后悬挂类型'),
				array('name'=>'chassis_help_power',	'length'=>50,	'title'=>'助力类型',	'input'=>'select'),
				array('name'=>'chassis_structure',	'length'=>50,	'title'=>'底盘结构',	'input'=>'select'),
				)
			),
		'brake'=> array(  
			'title' =>'车轮制动',
			'field'=>array(
				array('name'=>'brake_front_type',	'length'=>50,	'title'=>'前制动器类型',	'input'=>'select'),
				array('name'=>'brake_rear_type',	'length'=>50,	'title'=>'后制动器类型',	'input'=>'select'),
				array('name'=>'brake_park_type',	'length'=>50,	'title'=>'驻车制动类型',	'input'=>'select'),
				array('name'=>'brake_front_wheel',	'length'=>50,	'title'=>'前轮胎规格'),
				array('name'=>'brake_rear_wheel',	'length'=>50,	'title'=>'后轮胎规格'),
				array('name'=>'brake_spare_wheel',	'length'=>50,	'title'=>'备胎规格'),
				)
			),
		'safe'=> array(  
			'title' =>'安全装备',
			'field'=>array(
				array('name'=>'safe_airbag_driver',	'length'=>2,	'title'=>'驾驶座安全气囊',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_deputy',	'length'=>2,	'title'=>'副驾驶安全气囊',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_front_side',	'length'=>2,	'title'=>'前排侧气囊',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_rear_side',	'length'=>2,	'title'=>'后排侧气囊',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_front_head',	'length'=>2,	'title'=>'前排头部气囊(气帘)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_rear_head',	'length'=>2,	'title'=>'后排头部气囊(气帘)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_airbag_knee',	'length'=>2,	'title'=>'膝部气囊',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_seat_belt_prompt',	'length'=>2,	'title'=>'安全带未系提示',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_engine_security',	'length'=>2,	'title'=>'发动机电子防盗',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_car_central_lock',	'length'=>2,	'title'=>'车内中控锁',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_remote_key',	'length'=>2,	'title'=>'遥控钥匙',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'safe_keyless_start',	'length'=>2,	'title'=>'无钥匙启动系统',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'control'=> array(  
			'title' =>'操控设备',
			'field'=>array(
				array('name'=>'control_abs',	'length'=>2,	'title'=>'ABS防抱死',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_ebd_cbc',	'length'=>2,	'title'=>'制动力分配(EBD/CBC等)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_eba_bas',	'length'=>2,	'title'=>'刹车辅助(EBA/BAS/BA等)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_asr_tcs',	'length'=>2,	'title'=>'牵引力控制(ASR/TCS/TRC等)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_esp_dsc',	'length'=>2,	'title'=>'车身稳定控制(ESP/DSC/VSC等)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_auto_park',	'length'=>2,	'title'=>'自动驻车/上坡辅助:',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_descent',	'length'=>2,	'title'=>'陡坡缓降',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_adjust_suspension',	'length'=>2,	'title'=>'可调悬挂',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_air_suspension',	'length'=>2,	'title'=>'空气悬挂',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_tire_pressure',	'length'=>2,	'title'=>'胎压监测装置',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_zero_tire_pressure',	'length'=>2,	'title'=>'零胎压继续行驶',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'control_active_steer',	'length'=>2,	'title'=>'主动转向系统',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'external'=> array(  
			'title' =>'外部配置',
			'field'=>array(
				array('name'=>'external_electric_sunroof',	'length'=>2,	'title'=>'电动天窗',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'external_panoramic_sunroof',	'length'=>2,	'title'=>'全景天窗',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'external_sporty_look',	'length'=>2,	'title'=>'运动外观套件',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'external_alloy_wheels',	'length'=>2,	'title'=>'铝合金轮毂',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'external_electric_door',	'length'=>2,	'title'=>'电动吸合门',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'internal'=> array(  
			'title' =>'内部配置',
			'field'=>array(
				array('name'=>'internal_leather_steer_wheel',	'length'=>2,	'title'=>'真皮方向盘',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_steer_wheel_ud',	'length'=>2,	'title'=>'方向盘上下调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_steer_wheel_lr',	'length'=>2,	'title'=>'方向盘前后调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_steer_wheel_ele',	'length'=>2,	'title'=>'方向盘电动调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_steer_wheel_multi',	'length'=>2,	'title'=>'多功能方向盘',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_steer_wheel_shift',	'length'=>2,	'title'=>'方向盘换挡',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_cruise',	'length'=>2,	'title'=>'定速巡航',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_park_assist',	'length'=>2,	'title'=>'泊车辅助',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_reversing_video',	'length'=>2,	'title'=>'倒车视频影像',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_trip_video',	'length'=>2,	'title'=>'行车电脑显示屏',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'internal_hud_digital',	'length'=>2,	'title'=>'HUD抬头数字显示',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'seat'=> array(  
			'title' =>'座椅配置',
			'field'=>array(
				array('name'=>'seat_leather',	'length'=>2,	'title'=>'真皮座椅',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_sport',	'length'=>2,	'title'=>'运动座椅',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_height_adjust',	'length'=>2,	'title'=>'座椅高低调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_lumbar_adjust',	'length'=>2,	'title'=>'腰部支撑调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_shoulder_adjust',	'length'=>2,	'title'=>'肩部支撑调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_front_auto',	'length'=>2,	'title'=>'前排座椅电动调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_raer_manually',	'length'=>2,	'title'=>'后排座椅手动调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_raer_auto',	'length'=>2,	'title'=>'后排座椅电动调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_electric_memory',	'length'=>2,	'title'=>'电动座椅记忆',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_front_heated',	'length'=>2,	'title'=>'前排座椅加热',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_rear_heated',	'length'=>2,	'title'=>'后排座椅加热',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_ventilation',	'length'=>2,	'title'=>'座椅通风',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_massage',	'length'=>2,	'title'=>'座椅按摩',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_rear_recline_overall',	'length'=>2,	'title'=>'后排座椅整体放倒',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_rear_recline_proportion',	'length'=>2,	'title'=>'后排座椅比例放倒',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_third_row',	'length'=>2,	'title'=>'第三排座椅',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_front_armrest',	'length'=>2,	'title'=>'前座中央扶手',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_rear_armrest',	'length'=>2,	'title'=>'后座中央扶手',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_rear_cup_holders',	'length'=>2,	'title'=>'后排杯架',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_auto_trunk',	'length'=>2,	'title'=>'电动后备箱',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_seconde_row_adjust',	'length'=>2,	'title'=>'第二排靠背角度调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'seat_seconde_row_move',	'length'=>2,	'title'=>'第二排座椅移动',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'media'=> array(  
			'title' =>'多媒体配置',
			'field'=>array(
				array('name'=>'media_gps_navigation',	'length'=>2,	'title'=>'GPS导航系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_position_interactive',	'length'=>2,	'title'=>'定位互动服务',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_center_console_sereen',	'length'=>2,	'title'=>'中控台彩色大屏',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_human_comouter_system',	'length'=>2,	'title'=>'人机交互系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_internal_hard_drive',	'length'=>2,	'title'=>'内置硬盘',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_bluetooth_car_phone',	'length'=>2,	'title'=>'蓝牙/车载电话',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_car_tv',	'length'=>2,	'title'=>'车载电视',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_rear_display',	'length'=>2,	'title'=>'后排液晶屏',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_external_audio',	'length'=>2,	'title'=>'外接音源接口(AUX/USB/iPod等)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_cd_mp3',	'length'=>2,	'title'=>'CD支持MP3/WMA',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_single_disc_cd',	'length'=>2,	'title'=>'单碟CD',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_virtual_multi_disc_cd',	'length'=>2,	'title'=>'虚拟多碟CD',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_multi_disc_cd',	'length'=>2,	'title'=>'多碟CD系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_single_disc_dvd',	'length'=>2,	'title'=>'单碟DVD-系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_multi_disc_dvd',	'length'=>2,	'title'=>'多碟DVD系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_speaker_system_23',	'length'=>2,	'title'=>'2-3喇叭扬声器系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_speaker_system_45',	'length'=>2,	'title'=>'4-5喇叭扬声器系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_speaker_system_67',	'length'=>2,	'title'=>'6-7喇叭扬声器系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'media_speaker_system_89',	'length'=>2,	'title'=>'≥8喇叭扬声器系统',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'light'=> array(  
			'title' =>'灯光配置',
			'field'=>array(
				array('name'=>'light_head_xenon',	'length'=>2,	'title'=>'氙气大灯',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_daytime_running',	'length'=>2,	'title'=>'日间行车灯',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_head_auto',	'length'=>2,	'title'=>'自动头灯',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_head_assist',	'length'=>2,	'title'=>'转向头灯(辅助灯)',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_head_fog',	'length'=>2,	'title'=>'前雾灯',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_head_height_adjust',	'length'=>2,	'title'=>'大灯高度可调',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_head_washer',	'length'=>2,	'title'=>'大灯清洗装置',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'light_internal',	'length'=>2,	'title'=>'车内氛围灯',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'glass'=> array(  
			'title' =>'玻璃/后视镜',
			'field'=>array(
				array('name'=>'glass_auto_before_window',	'length'=>2,	'title'=>'前电动车窗',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_auto_after_window',	'length'=>2,	'title'=>'后电动车窗',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_window_fangga_hand',	'length'=>2,	'title'=>'车窗防夹手功能',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_insulation',	'length'=>2,	'title'=>'防紫外线/隔热玻璃:',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_view_auto',	'length'=>2,	'title'=>'后视镜电动调节',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_view_heating',	'length'=>2,	'title'=>'后视镜加热',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_view_dimming',	'length'=>2,	'title'=>'后视镜自动防眩目',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_view_auto_fold',	'length'=>2,	'title'=>'后视镜电动折叠',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_after_wind_sunshade',	'length'=>2,	'title'=>'后风挡遮阳帘',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_side_sunshade',	'length'=>2,	'title'=>'后排侧遮阳帘',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_sunshade_mirror',	'length'=>2,	'title'=>'遮阳板化妆镜',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_rear_wiper',	'length'=>2,	'title'=>'后雨刷',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'glass_auto_wiper',	'length'=>2,	'title'=>'感应雨刷',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'cryogen'=> array(  
			'title' =>'空调冰箱',
			'field'=>array(
				array('name'=>'cryogen_manual_air',	'length'=>2,	'title'=>'手动空调',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_auto_air',	'length'=>2,	'title'=>'自动空调',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_rear_air',	'length'=>2,	'title'=>'后排独立空调',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_rear_site_wide',	'length'=>2,	'title'=>'后座出风口',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_temperature_zone',	'length'=>2,	'title'=>'温度分区控制',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_filter',	'length'=>2,	'title'=>'空气调节/花粉过滤',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'cryogen_icebox',	'length'=>2,	'title'=>'车载冰箱',	'input'=>'radio',	'option'=>'comm_config')
				)
			),
		'tech'=> array(  
			'title' =>'高科技配置',
			'field'=>array(
				array('name'=>'tech_auto_park',	'length'=>2,	'title'=>'自动泊车入位',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_and_line_assist',	'length'=>2,	'title'=>'并线辅助',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_active_brake',	'length'=>2,	'title'=>'主动刹车/主动安全系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_active_steer',	'length'=>2,	'title'=>'整体主动转向系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_night_vision',	'length'=>2,	'title'=>'夜视系统',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_lcd_split_screen',	'length'=>2,	'title'=>'中控液晶屏分屏显示',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_adaptive_cruise',	'length'=>2,	'title'=>'自适应巡航',	'input'=>'radio',	'option'=>'comm_config'),
				array('name'=>'tech_panoramic_camera',	'length'=>2,	'title'=>'全景摄像头',	'input'=>'radio',	'option'=>'comm_config')
			)
		)

	);

?>
	<div id="maincontent_inner">
		<div id="sidebar">
			<div class="menu single">
				<ul>
					<li><a href="#">车辆基础信息库管理</a>
						<ul>
							<li class="current"><a href="<?php echo site_url("c=car_info&m=index"); ?>">车辆信息管理</a></li>
							<li><a href="<?php echo site_url("c=car_brand&m=index"); ?>">车辆品牌管理</a></li>
							<li><a href="<?php echo site_url("c=car_series&m=index"); ?>">车辆系列管理</a></li>
							<li><a href="<?php echo site_url("c=car_type&m=index"); ?>">车辆类型管理</a></li>
							<li><a href="<?php echo site_url("c=car_structure&m=index"); ?>">车辆结构管理</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<div id="content">
			
			<?php if($structureid) {?>
			<div class="title">编辑车辆信息</div>
			<?php }else {?>
			<div class="title">新增车辆信息</div>
			<?php }?>
			<div class="infoarea">
				<form  id="editForm" name="editForm"  action="<?php echo site_url("c=car_info&m=$method&carid=$carinfo[carid]"); ?>" method="post" >
				<input type="hidden" name="carinfoeditsubmit" value="true" />
				<div id="tabs">
					<ul>
						<li><a href="#tabs-base">基本信息</a></li>
						
						 <?php 
							if($carinfo_extend_fields)
							{
								foreach($carinfo_extend_fields as $key=>$group){ 
									?>
									<li><a href="#tabs-<?php echo $key?>"><?php echo $group['title']?></a></li>
 
									<?php 
								}
							}
							 ?>
					</ul>
					<div id="tabs-base">
						<table border="0" cellspacing="0" cellpadding="0" width="100%" class="aev">
							<tr>
								<th>车型名称:</th>
								<td><input type="text" class="half" id="carname" name="carname" value="<?php echo $carinfo['carname']?>"/><?php echo form_error('carname'); ?></td>
							</tr>
							<tr>
								<th>汽车品牌:</th>
								<td>
								<select id="brandid" name="brandid"> 
								<option value="0"  >-----选择-----</option>

								 <?php 
								if($brandlist)
								{
									foreach($brandlist as $brand){ 
										if($carinfo['brandid']==$brand['brandid'])
										{
										?>
										<option selected value="<?php echo $brand['brandid']; ?>"><?php echo $brand['brandname']; ?></option>
										 <?php }else{ ?>
										 <option value="<?php echo $brand['brandid']; ?>"><?php echo $brand['brandname']; ?></option>
										<?php 
										}
									}
								}
								 ?>
									</select>	
							</td>
							</tr>
							<tr>
								<th>所属车系:</th>
								<td><select id="seriesid" name="seriesid"><option selected>-----选择-----</option></select></td>
							</tr>
							<tr>
								<th>汽车级别:</th>
								<td><select><option id="typeid" name="typeid" value="0"  >-----选择-----</option>

								 <?php 
								if($typelist)
								{
									foreach($typelist as $type){ 
										if($carinfo['typeid']==$type['typeid'])
										{
										?>
										<option selected value="<?php echo $type['typeid']; ?>"><?php echo $type['typename']; ?></option>
										 <?php }else{ ?>
										 <option value="<?php echo $type['typeid']; ?>"><?php echo $type['typename']; ?></option>
										<?php 
										}
									}
								}
								 ?></select></td>
							</tr>  
							
							<tr>
								<th>车体结构:</th>
								<td><select><option id="structureid" name="structureid" value="0"  >-----选择-----</option>

								 <?php 
								if($structurelist)
								{
									foreach($structurelist as $structure){ 
										if($carinfo['structureid']==$structure['structureid'])
										{
										?>
										<option selected value="<?php echo $structure['structureid']; ?>"><?php echo $structure['structurename']; ?></option>
										 <?php }else{ ?>
										 <option value="<?php echo $structure['structureid']; ?>"><?php echo $structure['structurename']; ?></option>
										<?php 
										}
									}
								}
								 ?></select></td>
							</tr>
							<tr>
								<th>发动机:</th>
								<td><input type="text" class="half" id="carengine" size="50" name="carengine" value="<?php echo $carinfo['carengine']?>"/><?php echo form_error('carengine'); ?></td>
							</tr>  
							<tr>
								<th>变速箱:</th>
								<td><input type="text" class="half" id="transmission" size="50" name="transmission" value="<?php echo $carinfo['transmission']?>"/><?php echo form_error('transmission'); ?></td>
							</tr>  
							<tr>
								<th>最高车速:</th>
								<td><input type="text" class="small" id="maxspeed" size="50" name="maxspeed" value="<?php echo $carinfo['maxspeed']?>"/> km/h </td>
							</tr>
							<tr>
								<th>官方0-100加速:</th>
								<td><input type="text" class="small" id="maxspeed" size="50" name="maxspeed" value="<?php echo $carinfo['maxspeed']?>"/> s</td>
							</tr>
							<tr>
								<th>工信部综合油耗:</th>
								<td><input type="text" class="small" id="fueluse" size="50" name="fueluse" value="<?php echo $carinfo['fueluse']?>"/> L</td>
							</tr>
							<tr>
								<th>实测0-100加速:</th>
								<td><input type="text" class="small" id="realspeedup" size="50" name="realspeedup" value="<?php echo $carinfo['realspeedup']?>"/> s</td>
							</tr>
							<tr>
								<th>实测100-0制动:</th>
								<td><input type="text" class="small" id="realspeeddown" size="50" name="realspeeddown" value="<?php echo $carinfo['realspeeddown']?>"/> m</td>
							</tr>
							<tr>
								<th>实测油耗:</th>
								<td><input type="text" class="small" id="realfueluse" size="50" name="realfueluse" value="<?php echo $carinfo['realfueluse']?>"/> L</td>
							</tr>
							<tr>
								<th>整车质保:</th>
								<td><input type="text" class="half" id="wholewarranty" size="50" name="wholewarranty" value="<?php echo $carinfo['wholewarranty']?>"/></td>
							</tr>
						</table>					
					</div>
					 <?php 
					if($carinfo_extend_fields)
					{
						$carinfo_extend = $carinfo;
						foreach($carinfo_extend_fields as $key=>$field_group){ 
							?>
							<div id="tabs-<?php echo $key?>">
							<table border="0" cellspacing="0" cellpadding="0" width="100%" class="aev">
								<?php
								foreach($field_group['field'] as $field){ 
									?>
									<tr>
										<th><?php echo $field['title']?>:</th>
										<td><?php
									if(isset($field['input']))
									{
										if($field['input']=='number')
										{
											echo '<input type="text" class="small"  name="carinfo_extend['.$field['name'].']" maxlength="'.$field['length'].'" value="'.$carinfo_extend[$field['name']].'"/>';
										}
										elseif($field['input']=='radio')
										{
											if(!isset($carinfo_extend[$field['name']]))
											{
												$carinfo_extend[$field['name']]='';
											}
											if(isset($field['option']) && isset($carinfo_extend_options[$field['option']]))
											{
												$cur_options = $carinfo_extend_options[$field['option']];
												foreach($cur_options['option'] as $key=>$option)
												{
													if(isset($cur_options['type']) && $cur_options['type']=='key')
													{
														$checked = $key==$carinfo_extend[$field['name']]?' checked ':'';
														echo '<input type="radio" '.$checked.'  name="carinfo_extend['.$field['name'].']" id="carinfo_extend_'.$field['name'].'_'.$key.'"     value="'.$key.'"/>'."\r\n";
													}
													else
													{
														$checked = $option==$carinfo_extend[$field['name']]?' checked ':'';
														echo '<input type="radio" '.$checked.'   name="carinfo_extend['.$field['name'].']"  id="carinfo_extend_'.$field['name'].'_'.$key.'"  value="'.$option.'"/>'."\r\n";
													}
													echo "<label for=\"carinfo_extend_".$field['name']."_$key\">$option</label>\r\n";
												}
											}
										}
										elseif($field['input']=='select')
										{
											echo "<select name=\"carinfo_extend[".$field['name']."]\">";
											echo "<option value=\"\">-----选择-----</option>\r\n";
											if(!isset($carinfo_extend[$field['name']]))
											{
												$carinfo_extend[$field['name']]='';
											}
											if(!isset($field['option']))
											{
												$field['option'] = $field['name'];
											}
											if(isset($field['option']) && isset($carinfo_extend_options[$field['option']]))
											{
												$cur_options = $carinfo_extend_options[$field['option']];
												foreach($cur_options['option'] as $key=>$option)
												{
													if(isset($cur_options['type']) && $cur_options['type']=='key')
													{
														$selected = $key==$carinfo_extend[$field['name']]?' selected ':'';
														echo "<option $selected value=\"$key\">$option</option>\r\n";
													}
													else
													{
														$selected = $option==$carinfo_extend[$field['name']]?' selected ':'';
														echo "<option $selected value=\"$option\">$option</option>\r\n";
													}
												}
											}
											echo '</select>';
										}
									}
									else
									{
										 
										$class=$field['length']>10? "half" : "small";
										 	
										echo '<input type="text" class="'.$class.'" name="carinfo_extend['.$field['name'].']" maxlength="'.$field['length'].'" value="'.$carinfo_extend[$field['name']].'"/>';
									}
									if(isset($field['unit']))
									{
										echo '&nbsp;'.$field['unit'];
									}
										?>
										</td>
									</tr>
									<?php 
								}
								?>
							</table>	
							</div>
							<?php 
						}
					}
					?>
				</div>
				<div class="box nav" style="margin-top:5px;margin-bottom:0;">
					&nbsp;<div style="float:right"><input type="submit" class="btn" value="确定"/><input type="submit" class="btn" value="返回"/></div>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
 <script language="javascript" src="<?php echo base_url("/resource/views/js/jquery.ui.js"); ?>"></script>

 <script>
	$(document).ready(function(){
		$("#tabs").tabs();
	});
</script>




<script type="text/javascript">
var seriesList = new Array();
var defaultBrandId ='<?php echo $carinfo['brandid']?>';
var defaultSeriesId ='<?php echo $carinfo['seriesid']?>';
var idx=0;
 <?php  

 if($serieslist)
 {

	foreach($serieslist as $brandid => $seriesgroup)
	{
		echo "seriesList['".$brandid."'] = new Array();\r\n";
		echo "idx=0;\r\n";
		foreach($seriesgroup as $series)
		{
			echo "seriesList['".$brandid."'][idx++] = new Array('".$series['seriesname']."','".$series['seriesid']."','".$series['brandid']."');\r\n";
		}
	}
 }
 ?>
 
function changeSeries()
{
	var seriesObj = $('#seriesid');
	var strhtml='<option value="0"  >-----选择-----</option>';
	var brandId =  $('#brandid').val();
	
	$('#seriesid option').remove();  

	if(seriesList[brandId])
	{
		optionArr = seriesList[brandId];
		for(idx=0;idx<optionArr.length;idx++)
		{
			if(defaultSeriesId == optionArr[idx][1])
			{
				strhtml += "<option selected value=\""+optionArr[idx][1]+"\">" +optionArr[idx][0]+"</option>";
			}
			else
			{
				strhtml += "<option value=\""+optionArr[idx][1]+"\">" +optionArr[idx][0]+"</option>";
			}
		}
	}
	seriesObj.append(strhtml);
}

$(document).ready(function(){
	$('#brandid').bind({
	  change: function() {
		changeSeries();
	  }
	 });
   changeSeries();
});
</script>